package createModel.BuilderModel;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Teacher {

    private String name;
    private int age;
    private String sex;

}


class Test{
    public static void main(String[] args) {
        Teacher teacher = Teacher.builder()
                .name("张三")
                .age(18)
                .sex("男")
                .build();
        System.out.println(teacher);
    }
}